package com.manage.func.article.dao;

import java.util.List;

import com.manage.base.dao.IBaseDao;
import com.manage.func.article.model.ArticleBean;
import com.manage.func.article.model.ArticleCatalogBean;
import com.manage.func.article.model.ArticleCommentBean;
import com.manage.func.article.model.ArticleExpireBean;

public interface IArticleDao extends IBaseDao<ArticleBean>{
	
	/**
	 * 查询新闻接口
	 * @param queryBean
	 * @return
	 */
	List<ArticleBean> selectArticleList(ArticleBean bean);
	
	
	ArticleBean selectArticleById(ArticleBean bean);
	
	/**
	 * 查询类别接口
	 * @param queryBean
	 * @return
	 */
	List<ArticleCatalogBean> selectArticleCatalogList();
	
	
	/**
	 * 插入新闻接口
	 * @param queryBean
	 * @return
	 */
	int insertArticle(ArticleBean queryBean);
	
	
	/**
	 * 查询新闻列表接口
	 * @param queryBean
	 * @return
	 */
	int deleteArticle(ArticleBean queryBean);
	
	
	/**
	 * 更新新闻接口
	 * @param queryBean
	 * @return
	 */
	int updateArticle(ArticleBean queryBean);

	
	/**
	 * 查询新闻总数接口
	 * @param queryBean
	 * @return
	 */
	int selectTotalCount(ArticleBean queryBean);

	//过期检查
	public List<ArticleExpireBean> expireSelect();
	//更新过期状态
	public int expireUpdate(Long articleId);
	
	
	/**
	 * 查询新闻评论
	 * @param bean
	 * @return
	 */
	List<ArticleCommentBean> selectArticleCommentListById(ArticleCommentBean bean);
	
	/**
	 * 查询评论数量
	 * @param queryBean
	 * @return
	 */
	int selectArticleCommentCountById(ArticleCommentBean queryBean);
	
	/**
	 * 设置新闻评论	
	 * @param queryBean
	 * @return
	 */
	int updateCommentStatus(ArticleCommentBean queryBean);


	void deleteTotalComment(ArticleCommentBean bean);


	void delCommont(ArticleCommentBean bean);
	
}
